import { INCREMENT, DECREMENT } from "./varuable";

export function increment(payload) {
    return {
        type: INCREMENT,
        payload,
    };
}
export function decrement(payload) {
    return {
        type: DECREMENT,
        payload,
    };
}

export function asyncincrement(payload) {
    return (dispatch) => {
        setTimeout(() => {
            dispatch(increment(payload));
        }, 500);
    };
}

export function asyncdecrement(payload) {
    return (dispatch) => {
        setTimeout(() => {
            dispatch(decrement(payload));
        }, 500);
    };
}
